podman-update: fix block device handling#26308
Merged
openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom Jun 16, 2025
Merged
podman-update: fix block device handling#26308openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom
openshift-merge-bot[bot] merged 4 commits intocontainers:mainfrom
Conversation
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Refactor these functions to - avoid repetition of common code (mostly stat of block device path); - perform early return if nothing is to be done; - remove some excessive nesting. It also improves some error messages. This is a preparation for the next commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
In case something other than a block device is supplied, podman proceeds to apply settings for a block device with the same minor:major. For example, "--blkio-weight-device /dev/zero:123" (alas, this is taken literally from podman-update(1) EXAMPLES section) sets blkio weight for /dev/ram5. Instead, it should error out since /dev/zero is not a block device. Add an appropriate check. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is a test case for an issue fixed by the previous commit. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Mainly this fixes an issue of using /dev/zero for block device examples. Also: * fix section title; * remove separate cgroup v2 and v1 examples, only leaving one; * break long lines. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Contributor
Author
Contributor
Author
|
Anything I need to do to move it forward? |
Member
|
@containers/podman-maintainers PTAL |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe, kolyshkin, Luap99 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
f235d47
into
containers:main
76 of 77 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While working on https://issues.redhat.com/browse/RHEL-81042, I found out that podman-update(1) man page contains an example which uses
/dev/zeroinstead of a block device. I also found out that it is working on some systems and not on others.What happens is, if a non-block device is specified, the
major:minornumbers from it are used to set weight and throttle limits (iops/bps) for a block device with the samemajor:minorpair. This does not make any sense.Can be seen as a continuation of #26022.
Does this PR introduce a user-facing change?